﻿package Utils {
	
	import flash.text.TextField;
	import flash.events.Event;
	
	public class Bindable {		
		protected var _data ;
		
		public function Bindable() {
			
		}

		public function bind(textField:TextField) {
			textField.addEventListener(Event.CHANGE,changeHandler);
			extract(textField.text);
		}
		
        private function changeHandler(e:Event):void {
            extract(e.currentTarget.text);
        }
		
		protected function extract(string:String)
		{
			throw new Error("You must ovverride this function ! ");
		}

	}
	
}
